package rip.protocol;

import java.util.List;

public class Message {
	private int cmd;
	private Router sender = null;
	private Router reciever = null;
	private List<Network> targetNetworkList = null;
	private List<Router> nextRouterList = null;
	private List<Short> distanceList = null;

	public Message() {
		this(null, null);
	}

	public Message(Router sender, Router reciever) {
		this(sender, reciever, null, null, null);
	}

	public Message(Router sender, Router reciever,
			List<Network> targetNetworkList, List<Router> nextRouterList,
			List<Short> distanceList) {
		this(0, sender, reciever, targetNetworkList, nextRouterList, distanceList);
	}

	public Message(int cmd, Router sender, Router reciever,
			List<Network> targetNetworkList, List<Router> nextRouterList,
			List<Short> distanceList) {
		this.cmd = cmd;
		this.sender = sender;
		this.reciever = reciever;
		this.targetNetworkList = targetNetworkList;
		this.nextRouterList = nextRouterList;
		this.distanceList = distanceList;
	}

	public int getCmd() {
		return cmd;
	}

	public void setCmd(int cmd) {
		this.cmd = cmd;
	}

	public Router getSender() {
		return sender;
	}

	public void setSender(Router sender) {
		this.sender = sender;
	}

	public Router getReciever() {
		return reciever;
	}

	public void setReciever(Router reciever) {
		this.reciever = reciever;
	}

	public List<Network> getTargetNetworkList() {
		return targetNetworkList;
	}

	public void setTargetNetworkList(List<Network> targetNetworkList) {
		this.targetNetworkList = targetNetworkList;
	}

	public List<Router> getNextRouterList() {
		return nextRouterList;
	}

	public void setNextRouterList(List<Router> nextRouterList) {
		this.nextRouterList = nextRouterList;
	}

	public List<Short> getDistanceList() {
		return distanceList;
	}

	public void setDistanceList(List<Short> distanceList) {
		this.distanceList = distanceList;
	}
}
